<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <h2>
        嵌入页面
    </h2>
    <div id="message"></div>
    <button id="btn">打开文件</button>
    <script>
        const btn = document.querySelector('#btn')
        
        const option = {
        title: '新消息提醒',
        body: '你有新的消息需要阅读'
    }
        btn.onclick = function(){
            new window.Notification(option.title,option)
        }
    </script>
</body>

</html>